
const str = 'abcde';
// console.log(str.split('').reverse().join(''));

const resStr = Array.from(str).reduce((acc, cur) => {
  return cur + acc;
}, '');
console.log(resStr);
